home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows News 2010 Summer - Disc 1
/
WN_Ete2010_CD1.iso
/
Onglet5
/
Weezo
/
Weezo setup.exe
/
{code_appDir}
/
www
/
local
/
uiResources
/
share.php
< prev
next >
Wrap
PHP Script
|
2010-05-19
|
24KB
|
700 lines
<?php
/**
* User Interface shared resources configuration
*
* PHP version 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category NA
* @package NA
* @author Nicolas Bruley / Peer 2 World <contact@weezo.net>
* @copyright 2005-2009 Nicolas Bruley / Peer 2 World
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id:$
* @link http://www.weezo.net
* @since File available since Release 2.0.0
*/
/**
* @desc Used for falphabetical sort of tree nodes
*
* @param array $a
* @param array $b
* @return integer
*/
function cmp($a,$b){
$a=strtolower($a['label']);
$b=strtolower($b['label']);
if ($a==$b) return 0;
return ($a < $b) ? -1 : 1;
}
/**
* @desc Insert new resource form dedicated to file sharing (called from windows context menu) - See rcNewResourceForm function for details
*
*/
function showNewFileResourceForm(){
global $resources;
require_once(INCLUDE_DIR.'explorerFunctions.php');
$files=cfGGetVar('uiResourceShellAction');
// Save for use if user confirmed resource creation (newResType/newResSubType async commands)
cfGSetVar('uiResourceShellFiles',$files,true);
// And destroy uiResourceShellAction so next sync refresh doesn't display form
cfGSetVar('uiResourceShellAction',false,true);
$possible=cfArrayValuesToKeys(array('file1','multimedia','video','music1','music3','photo1'));
// If selected file is a directory, allow everything
if(count($files)==1 && is_dir($files[0])){
}
else{
// music3 (music database): only valid for one single directory
unset($possible['music3']);
// Browse shared files to determine incompatible resources
foreach ($files as $file){
if(!is_dir($file)) switch (efFileType($file)){
case 'audio':
unset($possible['photo1']);
unset($possible['photo2']);
unset($possible['photo3']);
unset($possible['video']);
break;
case 'video':
unset($possible['photo1']);
unset($possible['photo2']);
unset($possible['photo3']);
unset($possible['music1']);
unset($possible['music3']);
break;
case 'image':
unset($possible['video']);
unset($possible['music1']);
unset($possible['music3']);
break;
default:
unset($possible['photo1']);
unset($possible['photo2']);
unset($possible['photo3']);
unset($possible['music1']);
unset($possible['music3']);
unset($possible['video']);
unset($possible['multimedia']);
}
}
}
// Set shown type & subtypes nodes on new resource form
$shownNodes='';
foreach ($possible as $v) $shownNodes.=(($shownNodes)?',':'{').'"'.addslashes($v).'":1';
$shownNodes='{"explorer":'.$shownNodes.'}}';
// And set form to show onload
?>
<script type="text/javascript">
//alert(wl.arrayPack(<?php echo $shownNodes;?>))
wl.UICommand('webPopup:/local/uiResources/shareNew.php?shownNodes='+wl.arrayPack(<?php echo $shownNodes;?>),false,'createResourceProceed');
</script>
<?php
}
/**
* Display a page showing all resources for a given type
*
*/
function displayResourceTypeLayoutPage($type,$subType=false){
global $resources;
// HTML Head
cfInsertHEAD(false);
?>
<script type="text/javascript">
function newRes(type,subType){parent.createResource(type,subType)}
</script>
</head><body style="padding-right:1.5em;padding-left:1.5em;">
<?php
$typeIconSrc='/res/'.$type.'/resourceIcon.png';
if(!is_file($typeIconSrc)) $typeIconSrc='/res/'.$type.'/resourceIcon.gif';
/**
* Misc resources: display install button
*/
if($type=='misc' && cfIsInApp()){
$installButton=outButton(cfCaption('resMisc').'...',"javascript:wl.UICommand('pluginmanagement')",outIcon('plugins'));
}
else $installButton='';
// Title
echo outDivFrame('frame1');
$img=outImage($typeIconSrc,false,false,'width:32;height:32;margin-right:0.5em;vertical-align:middle');
$img='';
echo outFrameHeaderTable('frame1Header','<span class="uiTabTitle">'.$img.(cfCaption('res'.ucfirst($type))).'</span>',$installButton);
// Search type's resources
$resourcesDefinitions=cfMGetVar('weezoResourcesDefinitions');
/**
* Browse subtypes
*/
if(isset($resourcesDefinitions[$type])) foreach ($resourcesDefinitions[$type] as $rSubType=>$memVarName){
// If a single subType should be displayed, skip all others
if($subType && $subType!=$rSubType) continue;
$rData=rcGetResourceDefinition($type,$rSubType);
if(isset($rData['describer']['deprecated'])) continue;
echo outDivFrame('frame3 solidBorder',false,(($subType)?'margin-top:5em':''));
$rPath='/res/'.$type.'/'.$rSubType;
$icoPath=$rData['resourceIcon'];
// Set node
$r=outButton(cfCaption('adminResourceCreate'),"javascript:newRes('".$type."','".$rSubType."')",outIcon('new'));
// If "singleInstance" set, check if this resource has already been created
if(@$rData['describer']['singleInstance']){
if(is_array($resources)) foreach ($resources as $rid=>$res) if($res['type']==$type && $res['subType']==$rSubType){
$r=outButton(cfCaption('adminResourceCreate'),"javascript:newRes('".$type."','".$rSubType."')",outIcon('new'),false,false,false,false,true);
break;
}
}
// Icon, name and new resource button
echo outFrameHeaderTable('frame2Header',outImage($icoPath,false,false,'margin-right:0.5em;vertical-align:middle').$rData['name'],$r);
// Screenshot
echo '<center>';
if(file_exists(cfAppDocRoot().$rPath.'/preview.jpg')) echo outImage($rPath.'/preview.jpg');
else echo '<div class="frame3" style="width:100px;height:100px;padding-top:45px">'.cfCaption('genNoPreview').'</div>';
echo '</center>';
// Description
echo '<div class="frame2" style="margin:1.5em;padding:1em">'.$rData['description'].'</div>';
echo '</div>';
}
exit;
}
/**
* @desc Generate resources tree
*
* @return unknown
*/
function shareResourcesTree($selectedFile){
global $resources;
$tree=array('ico'=>outIcon('resources'),'path'=>'top','label'=>'','sub'=>array());
$firstNode=false;
$folding=cfExplode2Levels('/',':',cfGGetVar('uiResouceTreeFolding'));
$defaultFound=0;
$nb=0;
$existingResources=cfMGetVar('weezoResourcesDefinitions');
// Regroup resources by type
foreach (array('explorer','bookmarks','webcam','blog','tv','administration','website','misc') as $type){
// Init type's node
$tree['sub'][$type]=array(
'ico'=>'/res/'.$type.'/resourceIconSmall.'.((file_exists(cfAppDocRoot().'/res/'.$type.'/resourceIconSmall.png'))?'png':'gif'),
'label'=>'<b>'.cfCaption('res'.ucfirst($type)).'</b>',
'sub'=>array())
+((isset($folding[$type]) && $folding[$type])?array():array('unfolded'=>true))
+(($type==$selectedFile)?array('selected'=>true):array())
;
if($type==$selectedFile) $defaultFound=1;
$createdTypes=array();
// Browse resources
foreach ($resources as $rid=>$res) if($res['type']==$type) {
$icoPath=$res['definition']['resourceIconSmall'];
$filename=$res['resourceFilename'];
$createdTypes[$res['subType']]=1;
// Set type's sub nodes
$tree['sub'][$type]['sub'][$filename]=array(
'ico'=>$icoPath,
'label'=>cfUTF8Encode($res['name'],false),
'tag'=>$res['subType'],
'sub'=>array()
);
if(!$defaultFound && $filename==$selectedFile) {
$tree['sub'][$type]['sub'][$filename]['selected']=true;
$defaultFound=1;
}
elseif (!$firstNode) $firstNode=array($type,$filename);
}
// Alphabetically sort type's resources
uasort($tree['sub'][$type]['sub'],'cmp');
// Browse existing resources to append inexisting ones
if(cfGGetVar('uiShowNonCreatedResources')){
if(isset($existingResources[$type])) foreach (@$existingResources[$type] as $subType=>$tmpId) if(!isset($createdTypes[$subType])){
$rDef=cfMGetVar($tmpId);
if(@$rDef['describer']['deprecated']) continue;
// Set type's sub nodes
$tree['sub'][$type]['sub'][$subType]=array(
'faded'=>1,
'ico'=>$rDef['resourceIconSmall'],
'label'=>(rcResourceCaptionUTF8($type,$subType)).
outImage(outIcon('minus'),false,'title="'.cfCaption('genHide').'" onclick="hideNCR()"','vertical-align:middle;cursor:pointer;width:16px;margin-left:0.5em').
outImage(outIcon('newVS'),false,'title="'.cfCaption('adminResourceCreate').'" onclick="createResource(\''.$type.'\',\''.$subType.'\')"','vertical-align:middle;cursor:pointer;width:16px;margin-left:0.5em'),
'sub'=>array()
);
}
}
//if(count($tree['sub'][$type]['sub'])==0) $tree['sub'][$type]['faded']=true;
//if(count($tree['sub'][$type]['sub'])==0) $tree['sub'][$type]['label']='youpi<br> ligne2<br> ligne3';
if(0 && count($tree['sub'][$type]['sub'])==0)
$tree['sub'][$type]['sub']['default']=array(
'ico'=>outIcon('resNo'),
'label'=>cfCaption('resNoResource').'...',
'tag'=>$res['subType'],
'disabled'=>1,
'sub'=>array()
);
}
// If default selected not found, select 1st resource
if(!$defaultFound && $firstNode) $tree['sub'][$firstNode[0]]['sub'][$firstNode[1]]['selected']=true;
$treeView=new treeView('resTree');
$treeView->phpTree=$tree;
$treeView->selectFunction='treeSelectRes';
$treeView->toggleFoldFunction='treeChangeFolding';
$treeView->rightClickFunction='treeRightClick';
return $treeView->HTML('frame3 solidBorder',false,false,'width:199px;height:382px');
}
/**
* @desc Generate:
* - a PHP array of resources ($resources),
* - a javascript array (=PHP string) of users-resouces association ($urArray),
* - a javascript array (=PHP string) of users ($usersArray),
* - a javascript array (=PHP string) of resources ($resourcesArray),
* - get administrator acount UID ($adminUID)
*
*/
function shareGenerateUsersAndResourcesArrays(){
global $resources;
global $urArray;
global $usersArray;
global $resourcesArray;
global $adminUID;
// Generate an array of user id=>user name
$users=cfUsersConfigs();
$usersArray='';
$adminUID='';
foreach ($users as $uid=>$user) {
$usersArray.=',"'.$uid.'":"'.addslashes(cfUTF8Encode($user->getVar('name'))).'"';
if($user->isAdministrator()) $adminUID=$uid;
}
$usersArray='{'.substr($usersArray,1).'}';
// Retreive resources from memory
$resources=array();
$resourcesArray='';
foreach (cfMGetVar('weezoResourcesList') as $rid=>$filename){
$resources[$rid]=cfMGetVar('weezoResData'.$rid);
$resourcesArray.=',"'.$filename.'":"'.addslashes(cfUTF8Encode($resources[$rid]['name'])).'"';
}
$resourcesArray='{'.substr($resourcesArray,1).'}';
$urArray=''; // Generate a JS array listing users bound to resources: Array(filename:Array(uid1,uid2...),... )
$ruArrayPHP=array(); // And its counterpart in PHP
foreach ($resources as $rid=>$res){
$filename=$res['resourceFilename'];
$urArray.=",'".$filename.'\':Array(';
$nb=0;
$ruArrayPHP[$filename]=array();
foreach ($users as $uid=>$user){
foreach ($user->getResources() as $rid=>$rfn) if($rfn==$filename){
$urArray.=(($nb)?',':'')."'".$uid."'";
$nb++;
$ruArrayPHP[$filename][$uid]=1;
}
}
$urArray.=')';
}
$urArray='{'.substr($urArray,1).'}';
}
// Indicate an in-application display
$_ENV['configurationEnvironment']='application';
if(!isset($_GET['configLng'])) $_GET['configLng']=cfGGetVar('language');
// Create fake resource to enable use of cfRGet/SetVar functions
cfRCreateFakeResource();
$selectedFile=cfGGetVar('uiResourceSelected');
require_once(INCLUDE_DIR.'resourceConfigFunctions.php');
require_once(INCLUDE_DIR.'outputFunctions.php');
/**
***************************************************************************************************************************
* Process Async command
***************************************************************************************************************************
*/
if(cfIsAsync()){
cfAsyncHeader();
// Selected resource update
if(isset($_POST['uiResourceSelected']) && $selectedFile!=$_POST['uiResourceSelected']){
cfGUpdateVar('uiResourceSelected',$_POST['uiResourceSelected']);
}
// Resource tree folding update
if(isset($_POST['uiResouceTreeFolding'])){
cfGUpdateVar('uiResouceTreeFolding',$_POST['uiResouceTreeFolding']);
}
// Hide not-yet-created resources
if(isset($_POST['uiShowNonCreatedResources'])){
cfGUpdateVar('uiShowNonCreatedResources',(int)$_POST['uiShowNonCreatedResources']);
echo cfAsyncXMLJSaction('wl.goURL()');
}
/**
* Create new resource of passed type/subType
*/
if(isset($_POST['newResType']) && isset($_POST['newResSubType'])){
// Using files passed by windows context menu
if(isset($_POST['useFilesList']) && ($files=cfGGetVar("uiResourceShellFiles"))){
// If single directory, create classical path var
if(count($files)==1 && is_dir($files[0])){
$resourceData=array('path'=>$files[0],'subFoldersIncluded'=>true,'sharedMode'=>'folder');
}
// Else create list-of-files resource
else{
$resourceData=array('path'=>'*appDir*/shared','subFoldersIncluded'=>true,'sharedMode'=>'list');
$resourceData+=array('sharedItems'=>implode('|',$files));
}
}
else $resourceData=array();
// If passed name
if(isset($_POST['resourceName'])) {
$resourceData['name']=cfUTF8Decode($_POST['resourceName'],true,false,false);
// Double UTF8 decode if request comming from standalone
// (wl.arrayPack does an internal UTF8 encoding to UI, which injects as-is into an <input>)
if(@$_POST['standalone']) $resourceData['name']=cfUTF8Decode($resourceData['name'],true,false,false);
}
// Create Resource
if($filename=rcCreateResource($_POST['newResType'],$_POST['newResSubType'],$resourceData)){
// Bind resource to selected users
if(isset($_POST['users'])) rcResourceAddToUsers($filename,explode('/',$_POST['users']));
cfGUpdateVar('uiResourceSelected',$filename);
echo cfAsyncXMLJSaction('D.location.reload()');
}
}
// Delete resource
if(isset($_POST['deleteResource']) && file_exists(cfAppDataDir().'/'.$_POST['deleteResource'])){
// Delete resource file and inform application
rcDeleteResource($_POST['deleteResource']);
}
// Remove resource from user
if(isset($_POST['removeResourceFromUser']) && isset($_POST['resource']) && isset($_POST['user'])){
$updatedUsers=array();
// Browse users to find concerned user(s)
foreach (cfUsersConfigs() as $uid=>$user) if($_POST['user']=='all' || $_POST['user']==$uid) {
$user->removeResource($_POST['resource']);
$user->save();
}
require_once(INCLUDE_DIR.'initFunctions.php');
ifResetResourcesUsers();
// Update bound users list in resource panel by async refreshing display
echo cfAsyncXMLJSaction('toggleUserDone("'.$_POST['resource'].'","'.$_POST['user'].'")');
}
// Add a resource to user
if(isset($_POST['connectResourceToUser']) && isset($_POST['resource']) && isset($_POST['user'])){
rcResourceAddToUsers($_POST['resource'],$_POST['user']);
// Update bound users list in resource panel by async refreshing display
echo cfAsyncXMLJSaction('toggleUserDone("'.$_POST['resource'].'","'.$_POST['user'].'")');
}
die(cfAsyncFooter());
}
/**
***************************************************************************************************************************
* Display a page showing all resources for a given type
***************************************************************************************************************************
*/
if(isset($_GET['resourceTypeLayout'])) displayResourceTypeLayoutPage($_GET['resourceTypeLayout'],@$_GET['resourceSubTypeLayout']);
// Erase temporary context-menu selected files
cfGSetVar('uiResourceShellFiles',false,true);
shareGenerateUsersAndResourcesArrays();
/**
***************************************************************************************************************************
* Insert page HEADER
***************************************************************************************************************************
*/
ob_start();
cfInsertHEAD(false);
echo cfScriptLink('winClient.js');
?>
</head>
<body style="margin:0;padding:0" onload="treeSelectRes();initDone=1">
<?php
echo cfScriptLink('wz_dragdrop.js');
?>
<script type="text/javascript">
var adminUID="<?php echo $adminUID;?>";
var users=<?php echo $usersArray;?>;
var resources=<?php echo $resourcesArray;?>;
var ur=<?php echo $urArray;?>;
var initDone=0;
// Tree folding changed
function treeChangeFolding(node){
var tn=node.treeView().tree['sub'],n,o='',p;
for(e in tn) {
n=new treeNode('resTree_'+tn[e]['path'])
p=n.getPath();
o+=(o?'/':'')+p.substr(p.lastIndexOf('/')+1)+':'+(n.isFolded()?1:0);
}
if(initDone) sendData('uiResouceTreeFolding='+o)
}
// Resource clicked
function treeSelectRes(node,noToggleFold){
var save=node?1:0;
if(!node) node=treeViews["resTree"].selectedNode;
var path=node.getPath().split('/');
selectedResource=path[path.length-1];
if(!save) node.focusView();
if(!save || !node.isSelected()) {
node.setSelected();
// Type
if(path.length==2) {
if(!noToggleFold && node.isFolded()) node.toggleFold();
dgi('resourceConfigFrame').src='<?php echo $_SERVER['PHP_SELF'];?>?resourceTypeLayout='+selectedResource;
}
// Resource subtype
else if(selectedResource.indexOf('.res')==-1){
dgi('resourceConfigFrame').src='<?php echo $_SERVER['PHP_SELF'];?>?resourceTypeLayout='+path[1]+'&resourceSubTypeLayout='+selectedResource;
}
// Resource
else{
dgi('resourceConfigFrame').src='/res/administration/std/resourceConfig.php?resourceConfigFilename='+selectedResource+'&configLng=<?php echo $_GET['configLng'];?>&resourceConfigScript=1';
}
if(save) sendData('uiResourceSelected='+selectedResource);
}
else if(!noToggleFold && path.length==2) node.toggleFold();
}
// Right click menu on resources treeView
function treeRightClick(node){
var path=node.getPath().split('/');
if(path.length==2) {
if(!node.isSelected()) treeSelectRes(node,true)
var items=Array();
items[0]=ContextMenuItem("<?php echo outIcon('new');?>","<?php echo cfCaption('resNewResource');?>","createResource('"+path[1]+"')");
var cm=new ContextMenu(items);
return;
}
else{
var adminUserOnly=0
if(!node.isSelected()) treeSelectRes(node)
selectedResource=path[2];
var boundUsers=ur[selectedResource];
if(path[1]=='administration') adminUserOnly=1
// Generate context-menu
var items=Array();
items[0]=0;
items[items.length]=ContextMenuItem('sep');
nbLinked=0;
for(var u in users){
if(adminUserOnly && u!=adminUID) continue; // If admin resource, show only administrator
linked=0;
for(i=0;i<boundUsers.length;i++) if(boundUsers[i]==u) linked=1;
nbLinked+=linked;
items[items.length]=ContextMenuItem((linked)?"<?php echo outIcon('cmChecked');?>":"<?php echo outIcon('v');?>",users[u],'toggleUser(\''+selectedResource+'\',\''+u+'\')');
}
// Set 1st item (remove from all users)
if(nbLinked==0) items[0]=ContextMenuItem("<?php echo outIcon('cancelVS');?>","<?php echo cfCaption('resRemoveFromAll');?>",false);
else items[0]=ContextMenuItem("<?php echo outIcon('cancelVS');?>","<?php echo cfCaption('resRemoveFromAll');?>",'toggleUser(\''+selectedResource+'\',\'all\')');
items[items.length]=ContextMenuItem('sep');
items[items.length]=ContextMenuItem("<?php echo outIcon('del');?>","<?php echo cfCaption('genDelete');?>",'deleteResource(\''+selectedResource+'\')');
var cm=new ContextMenu(items);
}
}
// Toggle user association with selected resource
function toggleUser(rid,uid){
if(uid=='all'){
ur[rid]=Array();
sendData('removeResourceFromUser=1&resource='+rid+'&user=all')
}
else{
var found=0;
for(var i=0;i<ur[rid].length;i++) {
if(ur[rid][i]==uid){
delete(ur[rid][i]);
found=1;
sendData('removeResourceFromUser=1&resource='+rid+'&user='+uid)
break;
}
}
if(!found) {
ur[rid][ur[rid].length]=uid;
sendData('connectResourceToUser=1&resource='+rid+'&user='+uid)
}
}
}
// Async Called in response to toggleUser
function toggleUserDone(rid,uid){
try{frames['resourceConfigFrame'].save(1)} catch(e){}
}
// Delete a resource
function deleteResource(rid){
if(ur[rid].length>1) capt="<?php echo cfCaptionJS('resConfirmDeleteMany');?>";
else if(ur[rid].length==1) capt="<?php echo cfCaptionJS('resConfirmDeleteOne');?>";
else capt="<?php echo cfCaptionJS('resConfirmDeleteNo');?>";
//var capt='<?php echo str_replace("'",'',cfCaption('userConfirmDelete'))?>';
capt=capt.replace(/%1/,resources[rid])
capt=capt.replace(/%2/,ur[rid].length)
capt=capt.replace(/<br>/g,"\n")
if(!confirm(capt)) return;
var n=treeViews["resTree"].selectedNode;
// Select prev node if existing
if(n.previousSibling()) treeSelectRes(n.previousSibling())
// else select next
else if(n.nextSibling()) treeSelectRes(n.nextSibling())
// else select parent
else treeSelectRes(n.parentNode(),1);
// Remove node
n.remove();
sendData("deleteResource="+rid)
}
// Create a resource.
function createResource(type,subType){
var shownNodes=false,args='?fromUI=1';
if(subType) {
args+='&newResType='+type+'&newResSubType='+subType;
}
else if(type) {
shownNodes={};
shownNodes[type]=1;
args+='&shownNodes='+wl.arrayPack(shownNodes)
}
// Open popup in UI
// Note: this popup is also opened directly by UI by simulating this call
wl.UIWebPopup('/local/uiResources/shareNew.php'+args,createResourceProceed);
}
function createResourceProceed(r){
eval('var resConfig='+r);
resConfig['standalone']=1;
wl.asr.send(resConfig);
}
// Update name while being modified in resource config
function resourceNameModified(filename,newName){
var type,sn,sn2,tn;
for(sn in treeViews["resTree"].tree.sub) {
type=treeViews["resTree"].tree.sub[sn];
for(sn2 in type['sub']) if(sn2==filename){
tn= new treeNode("resTree_"+type['sub'][sn2]['path'])
tn.setLabel(newName)
return;
}
}
}
// Called when share tab selected/unselected: forward info to configuration iframe
function tabSelected(isSelected,tabName){
if(frames['resourceConfigFrame'].tabSelected) frames['resourceConfigFrame'].tabSelected(isSelected);
}
function hideNCR(){wl.asr.send({'uiShowNonCreatedResources':0})}
<?php
// If a new resource webpopup is requested by UI (by creating "uiResourcesShareOpenNewResource" file into temp dir), do it
if(file_exists(cfAppTempDir().'/uiResourcesShareOpenNewResource')){
unlink(cfAppTempDir().'/uiResourcesShareOpenNewResource');
echo 'createResource();';
}
?>
</script>
<?php
// Create treeView
// Generate HTML
echo '<div class="frame2 uiLeftFrame" style="width:209px;margin:0;height:100%">';
echo '<div class="uiTabTitle">'.cfCaption('genResources').'</div>';
// New resource button
echo '<center style="margin-bottom:5px">';
echo outBt('<b style="font-weight:bold">'.cfCaption('resNewResource').'</b>',outIcon('new'),"javascript:createResource()",false,false,false,'up',160);
echo '</center>';
/**
* Resources tree
*/
echo '<div id="resTreeOuter">';
echo shareResourcesTree($selectedFile);
echo '</div>'; // treeOuter
echo '</div>';
echo '</div>';
?>
<iframe id="resourceConfigFrame" name="resourceConfigFrame" scrolling="auto" frameborder="0" src="" style="position:absolute;top:4;left:212;width:500;height:446"></iframe>
<?php
// New resource form
//rcNewResourceForm();
/**
***************************************************************************************************************************
* New Resource requested from context-menu
***************************************************************************************************************************
*/
if(cfGGetVar('uiResourceShellAction') && cfGGetVar('uiResourceAccordion')=='share') showNewFileResourceForm();
echo cfDragRegisterItems('');
//file_put_contents('C:/P1/share.html',ob_get_contents());
ob_flush();
?>
</body>